<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix ="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script src="resources/js/jquery.json-2.4.js"></script>
<script type="text/javascript">

var pageSize = 20;

function searchContents() {
	getContentsList(1);
}

function getContentsList(num) {
	var jsonParam = {
		co_id: $("input[name=co_id]").val(),
		num: num,
		pageSize: pageSize
	};
	
	$.ajax({
		url: "contentsList_detail.ga",
		type: "post",
		dataType: "html",
		data: {
			jsonParam: $.toJSON(jsonParam)
		},
		success: function(data) {
			$("#result").html(data);
		},
		error: function() {
			alert("오류");
		}
	});
}
</script>

</head>
<body>

<h2 style="float:left;">컨텐츠 등록 현황</h2>
<br/>
<table align="right">
	<tr>
		<td>
			<input type="button" value="컨텐츠 등록하기" class="bigBtn" onclick="location.href='regContentsForm.ga'" 
			/>
		</td>
	</tr>
</table>
<br style="clear:both;"/><br/>

<table width="100%" bgcolor="#eeeeee" style="text-align:center;">
    <tr>
        <td width="10%">광고주 선택</td>
        <td width="10%">
            <input type="button" value="선택"
                onclick="window.open('./selectAdvPopup.ga', 'ad', 'scrollbars=yes,status=no,resizable=no,width=440,height=300')"
                style="width:80px;"
            />
        </td>
        <td width="40%">
            <input id="coname_lb" type="text" style="width:300px;" disabled/>
            <input type="hidden" name="co_id" />
        </td>
        <td align="right">
        	<input type="button" value="검색" style="width:80px;" onclick="searchContents()"/>
        </td>
    </tr>
</table>
<br/><br/>


<!-- 검색 결과(광고주별 컨텐츠 리스트) -->
<div id="result"></div>

</body>
</html>